﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Caching;
using System.Web.Mvc;
using FluentData;
using SYS.Web.Models;
using SYS.Web.Function;
namespace SYS.Web.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Home/
        public Site currentSite = siteConfig.CurrentSite;
        public Page currentPage = new Page();
        public ActionResult Index()
        {
            IDbContext dbContext = new DbContext().ConnectionString(currentSite.DBConString, currentSite.DbProvider);
            string pageNo = "";

            List<Models.tbk_KeywordBySeed> relateData = currentSite.GetHomePageKids();
            currentPage.Title = currentSite.SiteName;
            currentPage.Title = currentSite.SiteName;
            currentPage.PageUrl = currentSite.SiteUrl;
            this.ViewData["currentPage"] = currentPage;
            return View(relateData);
        }

    }
}
